package com.westvalley.syn.bean;

public class SynResult {
	private long sdate;	//同步开始时间
	private long edate;	//同步结束时间
	private long useDate;	//执行耗时
	private Result result;	//执行结果
	
	private SynResult(){
		this.sdate = System.currentTimeMillis();
	}
	
	private SynResult(Result result){
		this.sdate = System.currentTimeMillis();
		this.result = result;
	}
	
	public static SynResult me(){
		return new SynResult();
	}
	
	public static SynResult me(Result result){
		return new SynResult(result);
	}
	
	public SynResult end(){
		this.edate = System.currentTimeMillis();
		this.useDate = this.edate-this.sdate;
		return this;
	}

	public long getSdate() {
		return sdate;
	}

	public void setSdate(long sdate) {
		this.sdate = sdate;
	}

	public long getEdate() {
		return edate;
	}

	public void setEdate(long edate) {
		this.edate = edate;
	}

	public long getUseDate() {
		return useDate;
	}

	public void setUseDate(long useDate) {
		this.useDate = useDate;
	}

	public Result getResult() {
		return result;
	}

	public void setResult(Result result) {
		this.result = result;
	}
}
